﻿#ifndef CPPTRANSLATION_H
#define CPPTRANSLATION_H
/*
 *
 * 多语言设置类
 *
*/
// QML 多语言
#include <QObject>
#include <QTranslator>
#include <QCoreApplication>
#include <QQmlEngine>


class CppTranslation : public QObject
{
    Q_OBJECT

public:

    static CppTranslation* getInstance(QQmlEngine *engine);

    Q_INVOKABLE void load(int index);

    bool readCsv(QString filePath, QList<QStringList> &data);


private:
    CppTranslation(QQmlEngine *engine);
    QTranslator* m_translator;
    QQmlEngine* m_engine;
signals:
};

#endif // CPPTRANSLATION_H
